<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/2
 * Time: 20:53
 */

namespace Admin\Controller;
use Admin\Common\Controller\BaseController;
use Admin\Model\SystemModel;

/**
 * Class SystemController
 * @package Admin\Controller
 * 网站配置控制器
 */
class SystemController extends BaseController
{
    /**
     * 网站基本配置方法
     */
    public function set(){
         if(IS_POST){
             $_POST['id']=1;
             $data=I('post.');
          $this->add((new SystemModel()),$data);
         }
        //读取旧数据
        $data = M('system')->where('sid=1')->find();
        $this->assign('system',$data['svalue']);
         $this->display();
    }
}













